<?php $this->load->view('header'); ?>

	<style type="text/css">
		.error {
			color: #fc4;
		}
	</style>

	<div class="wish-box">
		<div class="add-wish clearfix">
			<form method="post">
			<div class="area">
				<textarea name="content" id="content"></textarea>
				<?php echo form_error('content', '<div class="error">', '</div>'); ?>

			</div>
			<div class="input">
				<div>
					<label for="name">姓名：</label>
					<input type="text" id="name" name="name" />
				</div>
				<div>
					<label for="mobile">手机：</label>
					<input type="text" id="mobile" name="mobile" />
				</div>
				<!-- <div>
					<select>
						<option>在线祝福</option>
						<option>去三原</option>
						<option>去西安</option>
					</select>
				</div> -->
				<div>
					<button class="btn wish">提交祝福</button>
				</div>	
			</div>
			</form>
		</div>
		<ul>
			<?php foreach ($wish_list as $key => $wish): ?>
			<li>
				<div><?php echo $wish['content'];?></div>
				<i style="display:block;float:right;"> —— <?php echo empty($wish['name'])?'匿名':$wish['name'];?> </i>
			</li>


			<?php endforeach; ?>
			
			
			
		</ul>
	</div>

<script src="<?php echo base_url('static/js/jquery.min.js');?>"></script>
<script type="text/javascript">
	/*$(document).ready(function(){
		$(".wish").click(function(){

			content = $("#content").val();
			name = $("#name").val();

			if (content.length == 0) { alert('请输入祝福'); };

			$.post();
		});
	});*/
</script>

<?php $this->load->view('footer'); ?>